package com.czhong.ssh.springTest;

import java.util.Calendar;

/**
 * Created by DELL on 2017/2/18.
 */
public class DaoImpl implements IDao {

    public String sayHello(String str){
        int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);

        if (hour < 6)
            return "凌晨好" + str;
        if (hour < 12)
            return "上午好" + str;
        if (hour < 13)
            return "中午好" + str;
        if (hour < 18)
            return "下午好" + str;
        else
            return "晚上好" + str;
    }
}
